package com.cw.paging3

/**
 * ViewModel中需要传入ApiService，所以需要自定义ViewModelFactory
 */
//class MainViewModelFactory(private val apiService: APIService) : ViewModelProvider.Factory {
//
//    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
//        if (modelClass.isAssignableFrom(MainViewModel::class.java)) {
//            return MainViewModel(apiService) as T
//        }
//        throw IllegalArgumentException("Unknown ViewModel class")
//    }
//}
